<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // class People{
        //     sayArea(){
        //         console.log("我是地球人");
        //     }
        // }
        class ChinesePeople {
           sayArea(){
               console.log("我是中国人");
           }
        }
        class JapanesePeople {
            sayArea(){
               console.log("我是日本人");
           }
        }
        let p = new ChinesePeople();
        let p1 = new JapanesePeople();
        function say(p){
            p.sayArea();
        }
        // say(p);
        // say(p1);

        Array.prototype.show = function(){
            console.log("添加的show方法");
        }
        let ary = [1,2,3,4,5];
        ary.show();
        
        function fun1(){}
        let fun2 = function(){

        }
        let Student = class A{
            name = "张飞"
            constructor(name){
                this.name = name;
            }
            intro(){
                console.log(this.name + "你好");
            }
        }
        let s = new Student("小刚");
        s.intro();
    </script>
</body>
</html>